package com.lyf.hdc.controller;

import com.lyf.hdc.api.result.Result;
import com.lyf.hdc.dto.ProductStoreGenerateDto;
import com.lyf.hdc.service.ProductStoreService;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@Api(tags = "产品出入库管理")
@ApiSupport(author = "lyf", order = 9)
@RestController
@RequestMapping("/productStore")
public class ProductStoreController {

    @Autowired
    private ProductStoreService productStoreService;

    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "生成测试数据", notes ="该方法用于生成指定分组、指定数量、指定日期的入库数据，产品型号为X50、X50-PRO、X60、X60-PRO")
    @PostMapping("/generateTest")
    public Result generateTestData4ProductStore(ProductStoreGenerateDto dto){
        return productStoreService.generateTestData(dto);
    }
}
